﻿@page "/"

<div class="intro">
    <div class="avatar">
        <a href="javascript:;"><img src="https://static.meowv.com/images/avatar.jpg"></a>
    </div>
    <div class="nickname">阿星Plus</div>
    <div class="description">
        <p>
            生命不息，奋斗不止
            <br>Cease to struggle and you cease to live
        </p>
    </div>
    <div class="links">
        <NavLink class="link-item" title="Posts" href="posts">
            <i class="iconfont iconread"></i>
        </NavLink>
        <NavLink target="_blank" class="link-item" title="Notes" href="https://notes.meowv.com/">
            <i class="iconfont iconnotes"></i>
        </NavLink>
        <NavLink target="_blank" class="link-item" title="API" href="https://api2.meowv.com/">
            <i class="iconfont iconapi"></i>
        </NavLink>
        <NavLink class="link-item" title="Manage" href="/auth">
            <i class="iconfont iconcode"></i>
        </NavLink>
        <NavLink target="_blank" class="link-item" title="Github" href="https://github.com/Meowv/">
            <i class="iconfont icongithub"></i>
        </NavLink>
        <NavLink class="link-item weixin" title="扫码关注微信公众号：『阿星Plus』查看更多。" @onmouseover="Hover" @onmouseout="Hover">
            <i class="iconfont iconweixin"></i>
        </NavLink>
        <div class="qrcode @QrCodeCssClass">
            <img src="https://static.meowv.com/images/wx_qrcode.jpg" />
        </div>
    </div>
    <Audio tts="https://api2.meowv.com/common/tts/greetword" />
</div>

@code {
    /// <summary>
    /// 是否隐藏
    /// </summary>
    private bool IsHidden = true;

    /// <summary>
    /// 二维码CSS
    /// </summary>
    private string QrCodeCssClass => IsHidden ? "hidden" : null;

    /// <summary>
    /// 鼠标移入移出操作
    /// </summary>
    private void Hover() => IsHidden = !IsHidden;

    protected async override Task OnInitializedAsync()
    {
        await Common.SetTitleAsync();
    }
}